# 有一分数序列:2/1，3/2，5/3，8/5，13/8，21/13...
# 求出这个数列的前20项之和。

def fraction_nums(input_number):
    number = int(input_number)
    up = 2
    down = 1
    nums = 0

    for num in range(number):
        nums += up/down
        tatol = down
        down = up
        up = up + down
    print(nums)

input_sumber = int(input("请输入前多少项的和:"))
result = fraction_nums(input_sumber)
print(result)

# sum = 0
# up = 2
# down = 1
# for i in range(20):
#     sum += up/down
#     a = down
#     down = up
#     up = up + a
# print(sum)


